package org.rescue.extraction.GraphML;

import org.rescue.data.extraction.Extractor;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.SAXParser;
import java.io.*;

public class GMLExtractor implements Extractor {
	String fileName;
	GraphMLFileHandler mFileHandler;

	public GMLExtractor(String filename) {
		fileName = this.fileName;
		mFileHandler = new GraphMLFileHandler();
		// Use the default (non-validating) parser
		SAXParserFactory factory = SAXParserFactory.newInstance();
		try {
			// Parse the input
			SAXParser saxParser = factory.newSAXParser();
			saxParser.parse(new File(filename), mFileHandler);

		} catch (Exception e) {
		//	throw new Exception("Error loading graphml file: " + filename, e);
		}
	}
		

	public String getRecordSchema (GMLNodeData nodeData)
	{
		return null;
	}
	public String getRecordValues (GMLNodeData nodeData) 
	{
		return null;
	}
	public GMLNodeData getNext() 
	{
		return mFileHandler.getNextNodeData();
	}	
}
